#!/bin/bash

echo "🚀 启动多模块PF4J应用..."

cd pf4j-host

echo "📋 检查plugins目录:"
if [ -d "plugins" ]; then
    ls -la plugins
else
    echo "⚠️  plugins目录不存在，请先运行 ./build-multimodule.sh"
    exit 1
fi

echo ""
echo "🔥 启动宿主应用..."
echo "应用启动后，请访问以下URL进行测试:"
echo ""
echo "🌐 问候接口: http://localhost:8080/greet?name=张三"
echo "🔍 插件信息: http://localhost:8080/plugins"
echo ""

mvn spring-boot:run
